package stream;

import domain.User;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;

public class test {
    public static void main(String[] args) {
        List<User> users = new ArrayList<>();
        users.add(new User(1,"sss"));
        users.add(new User(20,"sss"));
        users.add(new User(3,"sss"));
        users.add(new User(4,"sss"));
        users.add(new User(4,"sss"));
        Set<User> collect = users.stream().collect(Collectors.toSet());
    }
}
